package com.xukai.springboot.datalayer.user;

import com.xukai.springboot.entity.sys.t_sys_user;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {

    /**
     * 根据用户登录名和密码获取用户信息
     */
    @Select("select  id, userName,loginname ,contact,wxCode,email,state,ico,`describe` from t_sys_user where " +
            "loginname=#{loginName} and `password`=#{password} and state=1")
    public t_sys_user Account(@Param("loginName") String loginName, @Param("password") String password);

    /**
     * 根据用户ID获取用户信息
     */
    @Select("select  id, userName,loginname ,contact,wxCode,email,state,ico,`describe` from t_sys_user where id=#{id}")
    public t_sys_user GetUserByID(@Param("id") int id);

}
